<% '************************************** '** reply.asp '** '** 文件说明:回复留言页面 '** 修改日期:2005-11-02 '** 作者:Howlion '** Email:howlion@163.com '************************************** if not login then errinfo="
  • 您未登陆或已经退出登陆,不能进入该页。" call showError() end if select case Request.QueryString("act") case "update" call update() case else pagename="回复留言" call bodySkin() sub pageContent() showReply() end sub end select function showReply() dim id id=request.querystring("id") sql="Select * from [topic] where id="&id set rs=server.CreateObject("adodb.recordset") rs.open sql,conn,1,3 if rs.eof and rs.bof then rs.close set rs=nothing errinfo="
  • 该留言不存在。" call showError() end if dim username,userURL,usermail,userqq,usertitle,usertime,usercontent,recontent username = HTMLencode(rs("username")) userURL = HTMLencode(rs("userURL")) usermail = HTMLencode(rs("usermail")) userqq = HTMLencode(rs("userqq")) usertitle = HTMLencode(rs("usertitle")) usertime = rs("usertime") usercontent = UBBCode(rs("usercontent"),rs("top")) recontent = rs("recontent") dim re,Referer Referer=Request.ServerVariables("HTTP_REFERER") Set re=new RegExp re.IgnoreCase =true re.Global=true re.Pattern="(\?|&)#(.*)" Referer=re.Replace(Referer,"") set re=Nothing %>
    • <%if rs("top")=1 then%><%else%>.gif" /><%end if%>
    • <%if rs("top")=1 then%>管理员<%else%><%=username%><%end if%>
    <%if rs("top")=1 then%>公告:<%else%>标题:<%end if%>

    <%=usertitle%>

    <%=usertime%>
    <%if not rs("userURL")="" then%> <%else%> <%end if%> <%if not rs("usermail")="" then%> <%else%> <%end if%> <%if not rs("userqq")="" then%> <%else%> <%end if%>
    <%=usercontent%>
    管理员回复:
    <%call getEmot()%>
    <%if not rs("checked")=1 then%>
    提示:如果留言被回复,将会自动通过审核。
    <%end if%>

         
    <% rs.close set rs=nothing end function sub update() dim id,Referer,recontent id=request.Form("id") Referer=request.form("Referer") recontent=request.Form("usercontent") if recontent="" then errinfo="
  • 未填写回复内容。" call showError() end if Set rs= Server.CreateObject("ADODB.Recordset") sql="select * from [topic] where id="&id rs.open sql,conn,3,2 rs.update rs("reply")="1" rs("retime")=NOW() rs("recontent")=recontent rs("checked")=1 rs.update rs.close set rs=nothing if instr(Referer,"=")>0 then Referer = Referer & "&#msg" & id else Referer = Referer & "?#msg" & id end if response.redirect Referer response.flush end sub %>